<template>
	<view @click="submit" class="btnContainer" :style="{opacity:opacity,width:width,height:height,lineHeight:height}">
		<slot>提交</slot>
	</view>
</template>

<script>
	export default {
		props:{
			disabled:{
				type:Boolean,
				default:false
			},
			shape:{
				type:String,
				default:'common' // round
			},
			width:{
				type:String,
				default:'654rpx'
			},
			height:{
				type:String,
				default:'88rpx'
			}
		},
		data(){
			return {
				
			}
		},
		computed:{
			opacity(){
				this.disabled ? 0.6 : 1
			}
		},
		methods:{
			submit(){
				if (!this.disabled) {
					this.$emit("submit")
				}
			}
		}
	}
</script>

<style scoped>
	.btnContainer {
		text-align: center;
		background: linear-gradient(270deg,#ff7a1c, #ffb228 100%);
		border-radius: 16rpx;
		box-shadow: 0rpx 10rpx 20rpx 0rpx #ffc8a2; 
		font-size: 32rpx;
		font-family: PingFangSC, PingFangSC-Regular;
		font-weight: 400;
		color: #ffffff;
		margin:0 auto;
	}
</style>
